----------------------------------Spell Variables--------------------------------------
SPELL.m_iSpellID = 70012 -- Whatever value you want as long as it doesn't override any other spells' IDs.
SPELL.m_iRange = 128
SPELL.m_sName = "Enraged Regeneration"
SPELL.m_sToolTip =	[[Heal yourself for
					100 points of damage
					over the next 10 secs.]]
SPELL.m_sIcon = "devin/blackbetty/spells/warrior/avatar.png"
SPELL.m_iCoolDown = 16
SPELL.m_iManaCost = 50
SPELL.m_bRequiresTarget = false
SPELL.m_iSpellType = SPELLTYPE_UTILITY

---------------------------------------------------------------------------------------

function SPELL:Cast( pl, target )
	local range = self.m_iRange
	
	print("Casted "..self.m_sName.."!")
		
	if(pl && pl:IsValid()) then
		pl:EmitSound("devin/blackbetty/weapons/GougeTarget.wav", 140, 100)
		timer.Create("EnragedRegenOn"..pl:EntIndex().."", 1, 12, function() 
			if(SERVER)then
				pl:EmitSound("devin/blackbetty/weapons/castsounds/FireCast.wav", 140, 100)
				ParticleEffectAttach( "fire_hands_instacast", PATTACH_POINT_FOLLOW, pl, pl:LookupAttachment("anim_attachment_RH"))
				ParticleEffectAttach( "fire_hands_instacast", PATTACH_POINT_FOLLOW, pl, pl:LookupAttachment("anim_attachment_LH"))
				local dmginfo_fbst = DamageInfo()
					dmginfo_fbst:SetDamage( -5 ) 
					dmginfo_fbst:SetDamageType( DMG_POISON)
					dmginfo_fbst:SetAttacker( pl ) 
					dmginfo_fbst:SetDamageForce( Vector( 0, 0, 1000 ) ) 
				pl:TakeDamageInfo( dmginfo_fbst )
			end
		end)
		pl:SetNWBool("Casting", false)
		pl:SetNWBool("Casted", false)
	end
end




